package org.inspursc.s0517.health.evaluation.utils;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class StringUtil {

    public static String generateWord() {

        String[] beforeShuffle = new String[]
                {"2", "3", "4", "5", "6", "7",
                        "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
                        "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
                        "w", "x", "y", "z"};
        List list = Arrays.asList(beforeShuffle);
        Collections.shuffle(list);
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < list.size(); i++) {
            sb.append(list.get(i));
        }
        String afterShuffle = sb.toString();

        String result = afterShuffle.substring(5, 9);

        return result;
    }
}
